﻿using System;
class SumOfIntegers
{
    static void Main()
    {
        int  firstintnumber;
        int  secondintnumber;
        int  thirdintnumber;
        Console.Write("Please input first number: ");
        while (true)
        {
            try
            {
                firstintnumber = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter first number:");
            }
        }
        Console.Write("Please input second number: ");
        while (true)
        {
            try
            {
                secondintnumber = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter second number:");
            }
        }
        Console.Write("Please input third number: ");
        while (true)
        {
            try
            {
                thirdintnumber = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter third number:");
            }
        }
        Console.WriteLine("The sum of {0}, {1} and {2} is: {3}", firstintnumber, secondintnumber, thirdintnumber, (firstintnumber+secondintnumber+thirdintnumber));
        Console.ReadLine();
    }
}

